home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Classes / 2.0_Venn / VennCell.h < prev    next >
Encoding:
Text File  |  1992-06-16  |  2.0 KB  |  78 lines

  1. // VennCell.h
  2. // Copyright (c) 1992 by Paul Burchard.
  3. // May be used in any form with appropriate acknowledgement.
  4.  
  5. #import <appkit/ActionCell.h>
  6.  
  7. typedef BOOL (*BOOLOP)(BOOL, BOOL, ...);
  8.  
  9. @interface VennCell : ActionCell
  10. {
  11.     id vennRegions[4];
  12.     float borderWidth;
  13.     // Drawing parameter cache.
  14.     NXRect drawRect, vennRects[4];
  15.     // Tracking parameter cache.
  16.     id trackingIn;
  17. }
  18.  
  19. - init;
  20. - initTextCell:(const char *)aString;
  21. - free;
  22.  
  23. // Setting the state.
  24. - setStateReplace:sender;
  25. - setStateRefine:sender;
  26. - setStateAdd:sender;
  27. - setStateRemove:sender;
  28. - setStateReverse:sender;
  29. - setState:(int)value;
  30. - takeStateFrom:sender;
  31. - takeStateFromIntValue:sender;
  32. - setStateFromOp:(BOOLOP)anOp;
  33.  
  34. // Testing the state.
  35. - (int)state;
  36. - (BOOL)evalOp:(BOOL)arg1 :(BOOL)arg2;
  37. - (int)argCount;
  38.  
  39. // Setting and testing appearance attributes.
  40. - setFont:fontObj;
  41. - setBorderWidth:(float)width;
  42. - (float)borderWidth;
  43. - takeFirstTitleFrom:sender;
  44. - takeSecondTitleFrom:sender;
  45. - setFirstTitle:(const char *)aString;
  46. - setSecondTitle:(const char *)aString;
  47. - (const char *)firstTitle;
  48. - (const char *)secondTitle;
  49.  
  50. // Managing display.
  51. - drawInside:(const NXRect *)cellFrame inView:controlView;
  52. - drawSelf:(const NXRect *)cellFrame inView:controlView;
  53. - calcSubCellRects:(NXRect *)theVennRects inRect:(const NXRect *)aRect;
  54. - calcDrawInfo:(const NXRect *)aRect;
  55. - calcCellSize:(NXSize *)minSize;
  56. - calcCellSize:(NXSize *)minSize inRect:(const NXRect *)aRect;
  57.  
  58. // Managing mouse events.
  59. - highlight:(const NXRect *)cellFrame inView:controlView lit:(BOOL)flag;//no-op
  60. - (BOOL)startTrackingAt:(const NXPoint *)startPoint inView:controlView;
  61. - (BOOL)continueTracking:(const NXPoint *)lastPoint
  62.     at:(const NXPoint *)currentPoint
  63.     inView:controlView;
  64. - stopTracking:(const NXPoint *)lastPoint
  65.     at:(const NXPoint *)stopPoint 
  66.     inView:controlView 
  67.     mouseIsUp:(BOOL)flag;
  68. - incrementState;//no-op
  69. - toggleVennRegion:sender;
  70.  
  71. // IB handshaking.
  72. - read:(NXTypedStream *)stream;
  73. - write:(NXTypedStream *)stream;
  74. - awake;
  75.  
  76. @end
  77.  
  78.